<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  const obj = {
    _a: 1,
    _b: 2,
    _c: {
      _c1: 3,
      _c2: 4
    }
  }

  function reactive(obj) {
    return new Proxy(obj, {
      get(target, property) {
        if (target[property] !== null && typeof target[property] === 'object') {
          return reactive(target[property])
        }
        console.log('get', property)
        return target[property]
      },
      set(target, property, newValue) {
        if (target[property] === newValue) return
        target[property] = newValue
      },
    })
  }

  const proxyObj = reactive(obj)
  console.log(proxyObj._c._c1)
</script>
</body>
</html>